<link href="../../Objects/sofa_white.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="contenu">
		
		<center><h3>ForceField based on springs</h3></center>
		
		<center><img src="TutorialForceFieldLiverSprings_0001.png" align="middle" width="300"></center>

                
		<div id="orangeText">Description:</div>
		    <p>
            SpringForceField components are used to describe a network of springs between particles. If the network of springs references particles belonging 
			to the same mechanical object, the ForceField is said to be internal. Otherwise, if it links several mechanical objects, it is said to be an interaction forcefield. 			
			Examples of SpringForceField components in Sofa are JointSpringForceField (for rigid mechanical objects) SpringForceField, and MeshSpringForceField
		    (for deformable mechanical objects). </p>
            <p>			
			To describe a SpringForceField, we therefore have to specify the following parameters: 
			<ul>
			<li>The two mechanical objects that are in interaction. It can be a unique mechanical object in the case of an internal ForceField.</li>
			<li> A set of pairs of indices which specify the end particles for each spring to be created. </li>
			<li> Finally, the internal parameters of each spring, like the rest length, the stiffness, and damping factor. </li>
			</ul>
			</p>
		<div id="orangeText">Key Points:</div>
            <ul>
			<li>If you have a limited number of particles that you want to connect with springs, you can use JointSpringForceField (for rigid bodies) 
			or SpringForceField (for deformable bodies) and specify manually the indices and spring parameters.</li>
			<li>If you load particles from a mesh using a MeshTopology component, there is a corresponding MeshSpringForceField component which 
			does the job of creating springs for you, leaving you only to specify global parameters for the springs. You can do fine tuning later on
			if you wish to.</li>
            </ul>

		<div id="orangeText">Results:</div><br>
		At each time step, the force computed by the SpringForceField is added to the mechanical objects in interaction. When the spring network 
		becomes large this can result in some instability, particularly if you wish to interact with your object using the mouse. 
		You can tweak spring parameters or the simulation parameters to resolve that issue, (like the vdamping factor if you use an implicit integration scheme) 
		but this can be a fastidious operation. <br>
		As a general rule, FEM ForceField methods provide a neater way to handle deformations.
		
		<center>
	      <img src="TutorialForceFieldLiverSprings_0002.png" width="300" name="TutorialSolverImplicitEuler" align="middle">
	    A MeshSpringForceField becoming unstable
		</center>

	</div>
</body>
</html>
